﻿using GN.Pay.TradeChannel.Configure;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GN.Pay.TradeChannel.YJPay
{
    [Serializable]
    public class YJPayConfigure : ATradeChannelConfigure<YJPayConfigureInfo>
    {
        public YJPayConfigure(IChannel channel)
            : base(channel)
        {

        }

        /// <summary>
        /// 
        /// </summary>
        protected override string NotifyControllerName
        {
            get
            {
                return "YJPay";
            }
        }

        public override string GetOrderQueryErrorMessage(string code)
        {
            throw new NotImplementedException();
        }

        public override string GetPayErrorMessage(string code)
        {
            throw new NotImplementedException();
        }

        public override string GetRefundErrorMessage(string code)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// 获取网关Url
        /// </summary>
        public string GatewayUrl
        {
            get
            {
                return "https://api.yiji.com/gateway.html";
            }
        }

        protected override void SaveCheck(YJPayConfigureInfo configureInfo)
        {
            CheckNotNull(configureInfo, nameof(configureInfo));
            CheckNotNullOrWhite(configureInfo.AccountId, nameof(configureInfo.AccountId));
            CheckNotNullOrWhite(configureInfo.Key, nameof(configureInfo.Key));
        }
    }
}
